<template>
    <div class="Order3">
        <yd-pullrefresh :callback="loadData" ref="pullrefreshDemo3">
            <item3/>
        </yd-pullrefresh>
        <load-more
                :canLoad="loadMoreState"
                @load="loadData"/>
    </div>
</template>

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator'
import Item3 from "@/views/order/component/Item3.vue";
import LoadMore from "@/components/LoadMore.vue";
@Component({
    name: 'Order3',
    components: {LoadMore, Item3}
})
export default class extends Vue {
    private loadMoreState: boolean = true;
    private loadData(number: number = 0): void {
        if (number === 0) { // 刷新
            // @ts-ignore
            LoadMore.resize()
        }
        let __this = this;
        setTimeout(() => {
            __this.$common.stopPullDownRefresh(__this, 'pullrefreshDemo3');
        }, 1000)
    }
}
</script>

<style scoped lang="less">
.Order3 {
    position: relative;
    padding: 0.2rem 0.3rem;
}
</style>
